﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CarLoanSystem.Entity;

namespace CarLoanSystem
{
    public partial class frmAddDownPay : Form
    {
        private static DownPaymentInfoItem downItem;
        public frmAddDownPay()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            downItem = new DownPaymentInfoItem();
            downItem.DOWN_PAYMENT_RATE = Convert.ToInt32(this.txtDownRate.Text);
            DAL.DownPaymentInfoDAL.Insert(downItem);
            MessageBox.Show("บันทึกข้อมูลเรียบร้อย","ข้อมูลอัตราเงินดาวน์");
            this.Close();
        }
    }
}
